1. Technical Field of the Invention
The present invention relates to a method and an apparatus for calibrating the position and attitude of the tip of an arm of a robot, such as an articulated type of robot preferably for use on factory floors.
2. Related Art
Industrial robots equipped with an articulated type of arm (called a manipulator) are now used in various kinds of sites. In such a robot, for reasons which are attributable to errors of motions of mechanical components and other factors, controlling the position of the tip of an arm requires calibration to make an actual position of the arm tip accord with a commanded positional value.
For example, one calibration technique is disclosed in Japanese Patent Laid-open Publication No. HEI 7-68480. In this publication, an error Δr is calculated between the positions and attitudes (positions/attitudes) of the tip of a manipulated arm, in which the positions and attitudes are calculated in a given coordinate system and measured by a measurement device placed outside the robot. Further, the calculated error Δr is applied to the conversion using a Jacobian determinant so that the error Δr is converted to calibration amounts (i.e., amounts to be offset) Δθ for the angles of respective joist of the root. Each of the offset amounts is added to each of actually detected angles of the arm to calculate the position and attitude of the tip of the manipulated arm again in the coordinate system. Further the error or is calculated again using the newly calculated position and attitude of the arm tip. The processing for the above steps is repeated until the error Δr becomes equal to or less than an allowable amount.
With reference to FIG. 1, this calculation technique will now be described. FIG. 1 shows the configuration of a robot system, which illustrates a model in which a six-axis vertical articulated type of robot 1 is calibrated. This robot system thus functionally includes a calibration apparatus for the robot 1.
The robot 1 is equipped with a manipulated arm whose tip end composes a flange 2. A tool 3 is attached to the flange 2. In FIG. 1, for simplification, only the tip of the tool 3 is illustrated as a representative for the tool 3. In this description, the tip (tip portion) of the tool 3 is thus provided as a “tip of a manipulated arm of the robot 1” (hereinafter, simply referred to as an “arm tip of the robot 1”).
A measurement device 4 is also provided, which is for example an optical camera, an infrared sensor, or a laser tracker. This measurement device 4 measures the arm tip of the robot 1 and provides a visual sensor controller 5 with signals of measured results (that is, measured visual information) for control of the position and attitude of the arm tip. The visual-sensor controller 5 uses the measured results to produce information indicating the position and attitude of the arm tip of the robot 1 and provides it to a control computer 6.
The robot 1 is provided with plural joint mechanical portions which provide respective axes and have joint angle detector 7 respectively. A signal indicative of a measured angle of each joint is handed to a robot controller 8 which serves as arm control means. The robot controller 8 operates based on a control program which requires input of the measured angles of the respective joints, so that the robot controller 8 controls of the operations of the robot 1. The information indicative of the measured joint angles is also provided to the control computer 6, which is thus able to use the provided information to perform the calculation for the calibration.
The coordinate systems adopted by the model shown in FIG. 1 include a coordinate system (X0, Y0, Z0) whose point of origin is a position where the measurement device 4 is located, a coordinate stem (Xr, Yr, Zr) whose point of origin is set to the position of a base which is the base portion of the robot 1, and a coordinate system (Xf, Yf, Zf) whose point of origin is the position of the flange 2.
In these coordinate systems, when the tip of the tool 3 is given as a measured point so that the measurement device 4 measures the position and attitude of the tip of the tool 3, a homogeneous transformation matrix indicating a vector from the point of origin of the coordinate system (X0, Y0, Z0) to the tip of the tool 3 is expressed as Tmea. In addition, a homogeneous transformation matrix corresponding to the above homogeneous transformation matrix Tmea. which is calculated by the control computer 6, is expressed by Trob.
Furthermore, the following homogeneous transformation matrices can be defined in the same manner as the above:                meabaseTrobbase a matrix indicating a vector from the position measurement device to the robot base;        robbaseTflange a matrix indicating a vector from the robot base to the robot flange; and        flangeTtool a matrix indicating a vector from the robot base to the tip of the tool.        
On computation, the following relationship (A) is established among the homogeneous transformation matrices other than the matrix Tmea.Trob=meabaseTrobbase·robbaseTflange·flangeTtool  (A)An error ΔφT is thus calculated as a difference between the matrix Tmea based on the measurement and the matrix Trob based on the calculation.
In general, at to the foregoing robot 1, the relationship between angles of the respective axes and the position and attitude of the arm tip is expressed by a homogeneous transformation matrix φ of 4 rows and 4 columns, as shown by a function f based on a formula (1).
                              φ          =                                    f              ⁡                              (                                  θ                  ,                  q                                )                                      =                                                            [                                                                                                              n                          x                                                                                                                      o                          x                                                                                                                      a                          x                                                                                                                      p                          x                                                                                                                                                              n                          y                                                                                                                      o                          y                                                                                                                      a                          y                                                                                                                      p                          y                                                                                                                                                              n                          z                                                                                                                      o                          z                                                                                                                      a                          z                                                                                                                      p                          z                                                                                                                                    0                                                                    0                                                                    0                                                                    1                                                                              ]                                                  (                  1                  )                                            =                              [                                                                            R                                                              P                                                                                                  0                                                              1                                                                      ]                                                    ⁢                                  ⁢                  q          =                      [                                                                                q                    1                                                                    …                                                                      q                    n                                                                        ]                          ⁢                                  ⁢                  θ          =                      [                                                                                θ                    1                                                                    ⋯                                                                      θ                    n                                                                        ]                          ⁢                                  ⁢                  R          =                                                    [                                                                                                    n                        x                                                                                                            o                        x                                                                                                            a                        x                                                                                                                                                n                        y                                                                                                            o                        y                                                                                                            a                        y                                                                                                                                                n                        z                                                                                                            o                        z                                                                                                            a                        z                                                                                            ]                            ⁢                                                          ⁢              P                        =                          [                                                                                          p                      x                                                                                                                                  p                      y                                                                                                                                  p                      z                                                                                  ]                                                          (        1        )            
In the formula (1), the function f is defined by both a variable θ which expresses angles of the respective axes of the robot 1 and a variable q which expresses a parameter to be calibrated. The variable q expresses various parameters including physical parameters of the robot 1, the positional and attitudinal relationship between the flange 2 and the tool 3, and the positional and attitudinal relationship between the measurement device 4 and the robot 1. Further, the function f is defined by a matrix R and a matrix P. The matrix R is a rotation matrix which shows respective components of a normal vector, an orientation vector, and an approach vector of the arm tip of the robot 1, and the matrix P is a position vector of the arm tip of the robot 1. Both vectors R and P are defined in the coordinate system (Xr, Yr, Zr) of the robot 1.
Furthermore, the error Δφ of position and attitude of the arm tip is related to the variable q to be calibrated, by using a Jacobian determinant Jq(θ, q) and an error vector Δq of the variable being calibrated, as shown by a formula (2).
                                          Δ            ⁢                                                  ⁢            φ                    =                                                                      J                  q                                ⁡                                  (                                      θ                    ,                    q                                    )                                            ·              Δ                        ⁢                                                  ⁢            q                          ⁢                                  ⁢                                            J              q                        ⁡                          (                              θ                ,                q                            )                                =                      [                                                                                                      n                                              y                        ,                        rob                                                              /                                          ∂                                              q                        1                                                                                                              …                                                                                            n                                              y                        ,                        rob                                                              /                                          ∂                                              q                        m                                                                                                                                          ⋮                                                  ⋱                                                  ⋮                                                                                                                        p                                              z                        ,                        rob                                                              /                                          ∂                                              q                        1                                                                                                              …                                                                                            p                                              z                        ,                        rob                                                              /                                          ∂                                              q                        m                                                                                                                  ]                          ⁢                                  ⁢                  Δ          ⁢                                          ⁢          q                =                              [                          Δ              ⁢                                                          ⁢                              q                1                            ⁢                                                          ⁢              Δ              ⁢                                                          ⁢                              q                2                            ⁢                                                          ⁢              …              ⁢                                                          ⁢              Δ              ⁢                                                          ⁢                              q                                  m                  -                  1                                            ⁢                                                          ⁢              Δ              ⁢                                                          ⁢                              q                m                                      ]                    t                                    (        2        )            
Using the formula (1), the error ΔφT appearing in the formula (4) can be changed as shown in a formula (3).
                                                                        Δ                ⁢                                                                  ⁢                                  φ                  T                                            =                                                T                  mea                                -                                  T                  rob                                                                                                        =                              [                                                                                                                              n                                                      x                            ,                            mea                                                                          -                                                  n                                                      x                            ,                            rob                                                                                                                                                                                        o                                                      x                            ,                            mea                                                                          -                                                  o                                                      x                            ,                            rob                                                                                                                                                                                        a                                                      x                            ,                            mea                                                                          -                                                  a                                                      x                            ,                            rob                                                                                                                                                                                        p                                                      x                            ,                            mea                                                                          -                                                  p                                                      x                            ,                            rob                                                                                                                                                                                                                            n                                                      y                            ,                            mea                                                                          -                                                  n                                                      y                            ,                            rob                                                                                                                                                                                        o                                                      y                            ,                            mea                                                                          -                                                  o                                                      y                            ,                            rob                                                                                                                                                                                        a                                                      y                            ,                            mea                                                                          -                                                  a                                                      y                            ,                            rob                                                                                                                                                                                        p                                                      y                            ,                            mea                                                                          -                                                  p                                                      y                            ,                            rob                                                                                                                                                                                                                            n                                                      z                            ,                            mea                                                                          -                                                  n                                                      z                            ,                            rob                                                                                                                                                                                        o                                                      z                            ,                            mea                                                                          -                                                  o                                                      z                            ,                            rob                                                                                                                                                                                        a                                                      z                            ,                            mea                                                                          -                                                  a                                                      z                            ,                            rob                                                                                                                                                                                        p                                                      z                            ,                            mea                                                                          -                                                  p                                                      z                            ,                            rob                                                                                                                                                                          0                                                              0                                                              0                                                              0                                                                      ]                                                                        (        3        )            
Hence, the error Δφ, which shows the error vector for the position and attitude of the arm tip of the robot 1, can be expressed as shown in a formula (4).Δφ=[ΔφT(1,2)ΔφT(2,2)ΔφT(3,2) . . . ΔφT(3,4)]t  (4)
In the formula (3), when two vectors among the normal, orient and approach vectors are given, a vector product of the given two vectors gives a remaining single vector. Hence, the formula (4) is expressed by a matrix of 9 rows and 1 column in which the error of the normal vector is omitted. Incidentally, a vector being omitted will not be limited to the normal vector, but any of the orientation and approach vectors may be omitted.
In addition, the formula (2) can be expressed as a formula (5).Δq=(Jq(θ,q)t·Jq(θ,q))−1·Jq(θ,q)t·Δφ  (5)
The formula (5) of Δq has a right-hand side, in which the remaining part other than Δφ provides a simulated inverse matrix of the Jacobian determinant Jq(θ, q).
Expanding the formula (2) at multiple n points (n≧2: positive integer) provides a formula (6), which also allows the formula (5) to be expanded into a formula (7).
                              [                                                                      Δ                  ⁢                                                                          ⁢                                      φ                    1                                                                                                      ⋮                                                                                      Δ                  ⁢                                                                          ⁢                                      φ                    n                                                                                ]                =                                            [                                                                                                                  J                                                  q                          ,                          1                                                                    ⁡                                              (                                                  θ                          ,                          q                                                )                                                                                                                                  ⋮                                                                                                                                      J                                                  q                          ,                          n                                                                    ⁡                                              (                                                  θ                          ,                          q                                                )                                                                                                        ]                        ·            Δ                    ⁢                                          ⁢          q                                    (        6        )                                          Δ          ⁢                                          ⁢          q                =                                                                              (                                                                                    [                                                                                                                                                                              J                                                                      q                                    ,                                    1                                                                                                  ⁡                                                                  (                                                                      θ                                    ,                                    q                                                                    )                                                                                                                                                                                                        ⋮                                                                                                                                                                                                            J                                                                      q                                    ,                                    n                                                                                                  ⁡                                                                  (                                                                      θ                                    ,                                    q                                                                    )                                                                                                                                                                    ]                                            t                                        ⁡                                          [                                                                                                                                                                  J                                                                  q                                  ,                                  1                                                                                            ⁡                                                              (                                                                  θ                                  ,                                  q                                                                )                                                                                                                                                                                          ⋮                                                                                                                                                                                              J                                                                  q                                  ,                                  n                                                                                            ⁡                                                              (                                                                  θ                                  ,                                  q                                                                )                                                                                                                                                        ]                                                        )                                                  -                  1                                            ⁡                              [                                                                                                                              J                                                      q                            ,                            1                                                                          ⁡                                                  (                                                      θ                            ,                            q                                                    )                                                                                                                                                ⋮                                                                                                                                                    J                                                      q                            ,                            n                                                                          ⁡                                                  (                                                      θ                            ,                            q                                                    )                                                                                                                    ]                                      t                    ·                      [                                                                                Δ                    ⁢                                                                                  ⁢                                          φ                      1                                                                                                                    ⋮                                                                                                  Δ                    ⁢                                                                                  ⁢                                          φ                      n                                                                                            ]                                              (        7        )            
In consequence, the calibration is made such that the error vector Δq is calculated by using the formula (7), the parameter q is updated by adding the calculated error vector Δq thereto, as shown in a formula (8).q=q+Δq  (8)
This calculation and update is repeated until a sum Δφall of the errors Δφ at multiple n points, which is shown by a formula (9), becomes equal to or less than a given threshold ε.
                              Δ          ⁢                                          ⁢                      φ            all                          =                  ∑                      [                                                                                                                          Δ                      ⁢                                                                                          ⁢                                              φ                        1                                                                                                                                                              ⋮                                                                                                                                            Δ                      ⁢                                                                                          ⁢                                              φ                        n                                                                                                                                      ]                                              (        9        )            
Incidentally, the technique taught by Japanese Patent Laid-open Publication No. HEI 7-68480 is applied to a condition where a parameter being calibrated is dedicated to only offsets of respective axis angles (i.e., errors of the respective axes at the point of origin). This means that the Jacobian determinant becomes holomorphic. Hence, without using the simulated inverse matrix shown in the formula (5), an inverse matrix J−1 is used the technique by the above publication.
By the way, in principle, the calibration requires only information about the robot physical parameter q indicating relationships including positional relationships between the tool and the measurement device and between the tool and the robot. However, the calibration technique taught by the foregoing publication requires i) information about the position and attitude indicating a relationship between the measurement device and the robot base and ii) information about the position and attitude indicating the flange (the arm tip) and the tool tip, in addition to information about the robot physical parameter. The foregoing two types of information i) and ii) are unknown because a robot is installed in different factories whose environmental conditions differ from each other, but it is required to calculate the robot physical parameter in the case of the technique taught by the foregoing publication. In consequence, the calculation for obtaining the robot physical parameter should will include the errors given by the foregoing two types of additional information i) and ii), resulting in that accuracy of the calibration will decrease due to the additional inclusion of the errors.
Additionally, the calibration technique taught by the foregoing publication is faced with an inconvenience resulting from estimation of absolute position. Though the forgoing conventional calibration is directed to improvement in absolute positional accuracy, it is usually very difficult to measure the absolute position of the arm tip of a robot. Thus, as a substitute procedure, the accuracy of the calibration is frequently estimated, based on relative position and attitude relationships obtained under a condition where a certain point related to a robot or a factor floor is assigned to a reference point. In effect, in a factor floor where a robot is installed, a certain reference point is first taught to the robot and other teaching points are taught based on a relative positional and attitudinal relationship with the reference point. The conventional calibration ignores the relative positional and attitudinal estimation, and is inconvenient in use in actual factory floors, often providing insufficient accuracy to the calibration.